/******************************************************************
Table 1: Determinants of Trust: OLS, FE, IV, and GMM Estimates
******************************************************************/
	
reg Trust Net_GDP_Capita_AVG_IMF Social_Spend_Capita Real_Debt ///
    Local_Central_Ratio hc_ext FIW_TOT Per_65 Inflation_AVG Unemployment_AVG, vce(robust)
	
reg Trust Net_GDP_Capita_AVG_IMF Social_Spend_Capita Real_Debt ///
    Local_Central_Ratio hc_ext FIW_TOT Per_65 Inflation_AVG Unemployment_AVG ///
    i.year_1, vce(robust)

ivregress 2sls Trust ///
    (Real_Debt = avg_other_Debt) ///
    Net_GDP_Capita_AVG_IMF Social_Spend_Capita ///
    Local_Central_Ratio hc_ext Per_65 Inflation_AVG Unemployment_AVG FIW_TOT, ///
    vce(robust)

xtset country_1 year_1
gmm (Trust - ///
     {Net_GDP_AVG}*Net_GDP_Capita_AVG_IMF - ///
     {SocialSpend}*Social_Spend_Capita - ///
     {Unemp_AVG}*Unemployment_AVG - ///
     {Inflation_AVG}*Inflation_AVG - ///
     {Debt}*Real_Debt - ///
     {LocalRatio}*Local_Central_Ratio - ///
     {HC}*hc_ext - ///
     {Age65}*Per_65 - ///
     {FIW}*FIW_TOT - ///
     {cons} ), ///
instruments( ///
     Net_GDP_Capita_AVG_IMF ///
     Unemployment_AVG ///
     Inflation_AVG ///
     Local_Central_Ratio ///
     hc_ext ///
     Per_65 ///
     l.Social_Spend_Capita l2.Social_Spend_Capita l3.Social_Spend_Capita ///
     l.FIW_TOT l2.FIW_TOT l3.FIW_TOT ///
     l.Real_Debt l2.Real_Debt l3.Real_Debt ///
) ///
nolog vce(robust)


/******************************************************************
Table 2: Determinants of Trust Including the Growth Rate of GDP per capita
******************************************************************/

reg Trust Net_GDP_Capita_Growth_IMF_l Social_Spend_Capita Real_Debt ///
    Local_Central_Ratio hc_ext FIW_TOT Per_65 Inflation_AVG Unemployment_AVG, vce(robust)
	
reg Trust Net_GDP_Capita_Growth_IMF_l Social_Spend_Capita Real_Debt ///
    Local_Central_Ratio hc_ext FIW_TOT Per_65 Inflation_AVG Unemployment_AVG ///
    i.year_1, vce(robust)

xtset country_1 year_1
gmm (Trust - ///
     {GDP_Growth}*Net_GDP_Capita_Growth_IMF_l - ///
     {SocialSpend}*Social_Spend_Capita - ///
     {Unemp_AVG}*Unemployment_AVG - ///
     {Inflation_AVG}*Inflation_AVG - ///
     {Debt}*Real_Debt - ///
     {LocalRatio}*Local_Central_Ratio - ///
     {HC}*hc_ext - ///
     {Age65}*Per_65 - ///
     {FIW}*FIW_TOT - ///
     {cons} ), ///
instruments( ///
     Net_GDP_Capita_AVG_IMF ///
     Unemployment_AVG ///
     Inflation_AVG ///
     Local_Central_Ratio ///
     hc_ext ///
     Per_65 ///
     l.Social_Spend_Capita l2.Social_Spend_Capita l3.Social_Spend_Capita ///
     l.FIW_TOT l2.FIW_TOT l3.FIW_TOT ///
     l.Real_Debt l2.Real_Debt l3.Real_Debt ///
) ///
nolog vce(robust)

/******************************************************************
Appendix Table A.1: Multiple Imputation Results
******************************************************************/

mi set wide

mi register imputed Trust Social_Spend_Capita Real_Debt FIW_TOT ///
    Net_GDP_Capita_AVG_IMF Local_Central_Ratio hc_ext Per_65 ///
    Inflation_AVG Unemployment_AVG avg_other_SS avg_other_Debt avg_other_FIW

mi register regular year_1

mi impute chained (regress) Trust Social_Spend_Capita Real_Debt FIW_TOT ///
    Net_GDP_Capita_AVG_IMF Local_Central_Ratio hc_ext Per_65 ///
    Inflation_AVG Unemployment_AVG avg_other_SS avg_other_Debt avg_other_FIW ///
    = i.year_1, add(20)

mi xtset country_1 year_1

* OLS
mi estimate: regress Trust Net_GDP_Capita_AVG_IMF Social_Spend_Capita Real_Debt ///
    Local_Central_Ratio hc_ext FIW_TOT Per_65 Inflation_AVG Unemployment_AVG
est store MI_OLS

* FE
mi estimate: xtreg Trust Net_GDP_Capita_AVG_IMF Social_Spend_Capita Real_Debt ///
    Local_Central_Ratio hc_ext FIW_TOT Per_65 Inflation_AVG Unemployment_AVG ///
    i.year_1, fe
est store MI_FE

* IV
mi estimate, cmdok: ivregress 2sls Trust (Real_Debt = avg_other_Debt) ///
    Net_GDP_Capita_AVG_IMF Social_Spend_Capita ///
    Local_Central_Ratio hc_ext Per_65 Inflation_AVG Unemployment_AVG FIW_TOT
est store MI_IV

/******************************************************************
Appendix Table A.2: Quadratic specifications: OLS
******************************************************************/

gen GDP2 = Net_GDP_Capita_AVG_IMF^2
gen SocSpend2 = Social_Spend_Capita^2
gen Debt2 = Real_Debt^2
gen Inflation2 = Inflation_AVG^2
gen Unemployment2 = Unemployment_AVG^2

reg Trust Net_GDP_Capita_AVG_IMF Social_Spend_Capita Real_Debt ///
    Local_Central_Ratio hc_ext FIW_TOT Per_65 Inflation_AVG Unemployment_AVG Unemployment2, vce(robust)
	
reg Trust Net_GDP_Capita_AVG_IMF Social_Spend_Capita Real_Debt ///
    Local_Central_Ratio hc_ext FIW_TOT Per_65 Inflation_AVG Unemployment_AVG Inflation2, vce(robust)
	
reg Trust Net_GDP_Capita_AVG_IMF Social_Spend_Capita Real_Debt ///
    Local_Central_Ratio hc_ext FIW_TOT Per_65 Inflation_AVG Unemployment_AVG SocSpend2, vce(robust)
	
reg Trust Net_GDP_Capita_AVG_IMF Social_Spend_Capita Real_Debt ///
    Local_Central_Ratio hc_ext FIW_TOT Per_65 Inflation_AVG Unemployment_AVG Debt2, vce(robust)
	
/******************************************************************
Appendix Table A.3: Quadratic specifications: GMM
******************************************************************/


gmm (Trust - ///
     {Net_GDP_AVG}*Net_GDP_Capita_AVG_IMF - ///
	 {Unemployment2}*Unemployment2 - ///
     {SocialSpend}*Social_Spend_Capita - ///
     {Unemp_AVG}*Unemployment_AVG - ///
     {Inflation_AVG}*Inflation_AVG - ///
     {Debt}*Real_Debt - ///
     {LocalRatio}*Local_Central_Ratio - ///
     {HC}*hc_ext - ///
     {Age65}*Per_65 - ///
     {FIW}*FIW_TOT - ///
     {cons} ), ///
instruments( ///
     Net_GDP_Capita_AVG_IMF ///
     Unemployment_AVG ///
     Inflation_AVG ///
     Local_Central_Ratio ///
     hc_ext ///
     Per_65 ///
	 GDP2 ///
     l.Social_Spend_Capita l2.Social_Spend_Capita l3.Social_Spend_Capita ///
     l.FIW_TOT l2.FIW_TOT l3.FIW_TOT ///
     l.Real_Debt l2.Real_Debt l3.Real_Debt ///
) ///
nolog vce(robust)

gmm (Trust - ///
     {Net_GDP_AVG}*Net_GDP_Capita_AVG_IMF - ///
	 {Inflation2}*Inflation2 - ///
     {SocialSpend}*Social_Spend_Capita - ///
     {Unemp_AVG}*Unemployment_AVG - ///
     {Inflation_AVG}*Inflation_AVG - ///
     {Debt}*Real_Debt - ///
     {LocalRatio}*Local_Central_Ratio - ///
     {HC}*hc_ext - ///
     {Age65}*Per_65 - ///
     {FIW}*FIW_TOT - ///
     {cons} ), ///
instruments( ///
     Net_GDP_Capita_AVG_IMF ///
     Unemployment_AVG ///
     Inflation_AVG ///
     Local_Central_Ratio ///
     hc_ext ///
     Per_65 ///
	 Inflation2 ///
     l.Social_Spend_Capita l2.Social_Spend_Capita l3.Social_Spend_Capita ///
     l.FIW_TOT l2.FIW_TOT l3.FIW_TOT ///
     l.Real_Debt l2.Real_Debt l3.Real_Debt ///
) ///
nolog vce(robust)

gmm (Trust - ///
     {Net_GDP_AVG}*Net_GDP_Capita_AVG_IMF - ///
	 {SocSpend2}*SocSpend2 - ///
     {SocialSpend}*Social_Spend_Capita - ///
     {Unemp_AVG}*Unemployment_AVG - ///
     {Inflation_AVG}*Inflation_AVG - ///
     {Debt}*Real_Debt - ///
     {LocalRatio}*Local_Central_Ratio - ///
     {HC}*hc_ext - ///
     {Age65}*Per_65 - ///
     {FIW}*FIW_TOT - ///
     {cons} ), ///
instruments( ///
     Net_GDP_Capita_AVG_IMF ///
     Unemployment_AVG ///
     Inflation_AVG ///
     Local_Central_Ratio ///
     hc_ext ///
     Per_65 ///
	 SocSpend2 ///
     l.Social_Spend_Capita l2.Social_Spend_Capita l3.Social_Spend_Capita ///
     l.FIW_TOT l2.FIW_TOT l3.FIW_TOT ///
     l.Real_Debt l2.Real_Debt l3.Real_Debt ///
) ///
nolog vce(robust)


gmm (Trust - ///
     {Net_GDP_AVG}*Net_GDP_Capita_AVG_IMF - ///
	 {Debt2}*Debt2 - ///
     {SocialSpend}*Social_Spend_Capita - ///
     {Unemp_AVG}*Unemployment_AVG - ///
     {Inflation_AVG}*Inflation_AVG - ///
     {Debt}*Real_Debt - ///
     {LocalRatio}*Local_Central_Ratio - ///
     {HC}*hc_ext - ///
     {Age65}*Per_65 - ///
     {FIW}*FIW_TOT - ///
     {cons} ), ///
instruments( ///
     Net_GDP_Capita_AVG_IMF ///
     Unemployment_AVG ///
     Inflation_AVG ///
     Local_Central_Ratio ///
     hc_ext ///
     Per_65 ///
	 Debt2 ///
     l.Social_Spend_Capita l2.Social_Spend_Capita l3.Social_Spend_Capita ///
     l.FIW_TOT l2.FIW_TOT l3.FIW_TOT ///
     l.Real_Debt l2.Real_Debt l3.Real_Debt ///
) ///
nolog vce(robust)
